<%@page import="java.util.Iterator"%>
<%@page import="com.google.appengine.api.blobstore.BlobInfoFactory"%>
<%@page import="com.google.appengine.api.blobstore.BlobInfo"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.List" %>

 <body>
	<table>
	<tr>
		<td><input type="text" name="filter" value="<%=request.getParameter("filter")%>"></td>
		<td><input type="button" value="Search"></td>
		<td><input type="button" value="Upload" onclick="window.location.href='./upload.jsp'"></td>
		<td><input type="button" value="Folder+"></td>
	</tr>
	</table>

	<table >
	<tr>
		<th>FileName</td>
		<th>Zise</td>
		<th>Date</td>
		<th>action</td>
	</tr>
	<% 
	
	BlobInfoFactory bif = new BlobInfoFactory();
	Iterator<BlobInfo> bii= bif.queryBlobInfos();
	
	
	
	while (bii.hasNext()){
		BlobInfo bi=bii.next();
	%>
		
	<tr>
 
		<td><%=bi.getFilename()%></td>
		<td><%=bi.getSize()%></td>
		<td><%=bi.getCreation()%></td>
		<td>
			<a href="/_xe/admin?action=run&blob-key=<%=bi.getBlobKey().getKeyString()%>">run</a>
			<a href="/_xe/admin?action=serve&blob-key=<%=bi.getBlobKey().getKeyString()%>">serve</a>
			<a href="/_xe/admin?action=delete&blob-key=<%=bi.getBlobKey().getKeyString()%>">del</a>
		</td>
	</tr>
		
	<% } %>
	
	</table>

 </body>